//
//  NCEmoticonView.h
//  BaiduNews
//
//  Created by neusoft on 11-7-25.
//  Copyright 2011 Neusoft. All rights reserved.
//

#import <UIKit/UIKit.h>

//GrayPageControl.h：
#import <Foundation/Foundation.h>
@interface GrayPageControl : UIPageControl {
    UIImage* activeImage;
    UIImage* inactiveImage;
    
    int      _lastPage;
}

@property (nonatomic, assign) int     lastPage;

@end


@protocol NCEmoticonViewDelegate <NSObject>

@optional
// Called by refresh header view to start refresh.
- (void)emoticonSelected:(NSString*)emoticonText;

@end


@interface NCEmoticonView : UIView<UIScrollViewDelegate>
{
	// Pointer only.
    UITextView      *_textView;
    UIView          *_parentView;
    
    GrayPageControl   *_pageControl;
    NSMutableArray  *_emoticonViewPageArray;
    BOOL            _isShown;

    UIScrollView        *_scrollView;
    // not own
    UIView          *_displayedPage;
    // not own
    UILabel         *_counterLabel;
    id              _delegate;
    
    BOOL            _writingViewFlag;
}

@property (nonatomic, assign) UILabel *counterLabel;

- (id)initWithFrame:(CGRect)frame
       withTextView:(UITextView*)textView
     withParentView:(UIView*)parentView;

- (id)initWithDelegate:(CGRect)frame
          withDelegate:(id)delegate;

- (void)show;
- (void)close;

- (BOOL)isShown;

- (void) setWritingViewFlag:(BOOL)flag;

@end
